using UnityEngine;
using System.Collections;

public class OpenWindowButton : MonoBehaviour {
	
	public GameObject WindowPrefab;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}
	
	void OnClick()
	{
		GameObject g = Instantiate(WindowPrefab) as GameObject;
		g.transform.parent = this.transform.parent.parent;
		g.transform.localScale = Vector3.one;
		g.transform.localPosition = Vector3.back * 50;
	}
}
